<template>
    <div>
        <input type="text"
               class="k-input-hidden"
               :required="required"
               :value="c"/>
        <el-select v-model="c">
            <el-option v-for="opt in options"
                       :key="opt.value"
                       :label="opt.text"
                       :value="opt.value"
            />
        </el-select>
    </div>
</template>

<script>
export default {
    name: 'KSelect',
    props: {
        value: [String, Number, Array],
        defaultValue: [String, Number, Array],
        required: Boolean,
        options: Array,
    },
    computed: {
        c: {
            get() {
                return this.value;
            },
            set(val) {
                this.$emit('input', val);
            }
        }
    }
}
</script>
